/*
 * @Author: 梦付千秋星垂野 465943794@qq.com
 * @Date: 2022-10-09 11:15:05
 * @LastEditors: 梦付千秋星垂野 465943794@qq.com
 * @LastEditTime: 2022-10-09 13:30:02
 * @FilePath: /practise--chat-app-react-nodejs/learn_express/1_express_get.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const express = require("express");
const app = express();
// app.get("/",function(req,res) {
//     //通过req.qurey可以获取客户端送过来的查询参数
//     //默认情况下res.query是一个空对象
//    console.log(req.query)
//    res.send(req.query)
    
// })
app.get("/:id",function(req,res) {
    //:id是一个动态参数，默认是空对项
   console.log(req.params)
   res.send(req.params)
    
})
app.listen(8001, () =>
console.log(`Server started on 127.0.0.1}`)
);
